//封装一个判断时间的函数
export const getTime = () => {
    const hours = new Date().getHours();
    let message: string;

    if (hours <= 8) {
        message = "早上好";
    } else if (hours <= 12) {
        message = "中午好";
    } else if (hours <= 18) {
        message = "下午好";
    } else {
        message = "晚上好"
    }

    return message;
}